package com.kitty.ws;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
import org.apache.cxf.interceptor.InterceptorProvider;

public class HelloWorldClient {

	 public static void main(String[] args) {
         JaxWsProxyFactoryBean svr = new JaxWsProxyFactoryBean();
         svr.setServiceClass(HelloWorld.class);
         svr.setAddress("http://localhost:8080/helloWorld");
         HelloWorld hw = (HelloWorld) svr.create();
         
         List<String> list = Arrays.asList("one","two","three");
         
         System.out.println(Arrays.toString(hw.SayHiToUserList(list)));
         User u = new User();
         u.setName("u");
         u.setPassword("p");
         System.out.println(hw.sayHiToUser2(u));
}

}
